CXX      = g++

SYG_SRC  = sygcpp1.1.cpp
SYGCPP   = sygcpp

LDFLAGS  += -O3 -s
LDLIBS   += -static-libgcc -lcrypto -lpthread

SYG_OBJS += $(patsubst %.cpp,obj/%.o,$(SYG_SRC))

all: mk_obj_dir $(SYGCPP)

mk_obj_dir:
	@mkdir -p obj

clean:
	$(RM) -r obj $(SYGCPP)


obj/%.o: %.cpp
	$(CXX) -c -o $@ $<

$(SYGCPP): $(SYG_OBJS)
	$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)

.PHONY: all
.PHONY: clean
.PHONY: mk_obj_dir
